<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>div+css布局</title>
		<style type="text/css">
			/*如果html标签没有背景色，而直接设置body背景色，则html会侵占body背景色，造成body背景色显示不正常*/
			html{
				background-color: white;
			}
			body{
				margin: 0px auto;/*集中处理*/
				width: 80%;
				height: 600px;/*一般不做设定，由内部标签的高度设定*/
				border: #41A863 solid 1px;
				background-color: #C9D7E5;
			}
			#mainContain{
				width: 100%;
				height: 100%;
			}
			.rowstyle1{
				clear: both;
				margin: 5px auto;
				width: 80%;
				height: 50px;
			}
			.rowstyle1 div{
				float: left;
				border: red solid 1px;
				width: 10%;
			}
			/*相对定位*/
			.rowstyle1 div:last-child{
				position: relative;
				/*left: 100px;*/
				/*right: 50%;*/
				/*top: -50%*/;
			}
		</style>
	</head>
	<body>
		<div id="mainContain">
			<div id="row1" class="rowstyle1">
				<div id="div1">div1</div>
				<div id="div2">div2</div>
				<div id="div3">div3</div>
			</div>
			<div id="row2" class="rowstyle1">
				<div id="div4">div4</div>
				<div id="div5">div5</div>
				<div id="div6">div6</div>
			</div>
			
		</div>
	</body>
</html>
